#include "MatrixObject.h"
#include "Tensor.h"
#include "Factorization.h"
int main()
{
	MatrixObject t1(2,1);
	MatrixObject t2(2,1);
	MatrixObject t4(2,1);
	Tensor t3(2);
	for(int i = 0; i < 2; i++)
	{
		for(int j=0; j < 2; j++)
		{
			for(int k=0; k<2; k++)
			{
				t3.setElement(i,j,k,(i+j+k)%2==0?0:(i+j+k)*0.1);//(i+j+k));
			}
		}
	}
	cout<<"Tensor is:";
	t3.Output();
	system("pause");
	Factorization::NTF(t3,t1,t2,t4,10);
	cout<<"Finish";
		system("pause");
		t1.Output();
		system("pause");
		t2.Output();
		system("pause");
		t4.Output();
		system("pause");
	/*
	for(int i = 0; i < 2; i++)
	{
		for(int j=0; j < 2; j++)
		{
			for(int k=0; k<2; k++)
			{
				t3.setElement(i,j,k,(i+1)*100+(j+1)*10+(k+1));
			}
		}
	}
	t3.Output();
	t3.matricification(1).Output();
	system("pause");
		t3.matricification(2).Output();
		system("pause");
			t3.matricification(3).T().Output();
	system("pause");
	*/
}